%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% defaults.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% function [u,v,fglob] = defaults(fcn)
% sets the default original boxes [u,v] and the opt function value fglob 
% in addition the global variables fglob, xglob and nglob are defined

function [u,v,fglob] = defaults(fcn)
global nglob xglob
% fglob        global minimum of fcn
% nglob        number of global minimizers in the box [u,v]
if fcn == 'loss_LR'
  u = [-10; -10; -10]; 
  v = [ 10;  10;  10]; %arbitrarily chosen
  
  %%%% Logistic Regression : finding an optimum
  opts = optimset('display', 'iter','TolFun',1e-9, 'MaxIter', 500,'MaxFunEvals',10000, 'TolX',1e-6);
  lambda0=zeros(length(u),1);
  [xglob,fglob,exitflag,output_LR] = fminsearch(@loss_LR,lambda0,opts);
  nglob = 1;
end
